package emulator.support;

import emulator.hardware.HwWord;
import emulator.util.MemoryPtr;

public class ImmediateAddressOperandEval implements OperandEval {
	
	MemoryPtr instruction;

	public ImmediateAddressOperandEval(MemoryPtr ptr) {
		instruction = ptr;
	}

	@Override
	public String getDetails(CpuState cpu_state) {
		return "$" + new HwWord(instruction.getWordOp());
	}

	@Override
	public boolean isAddress() {
		return true;
	}

	@Override
	public int getAddress(CpuState cpu_state) {
		return instruction.getWordOp();
	}

	@Override
	public boolean isIndirect() {
		return false;
	}
}
